import  jsonschema

json_data = {
    "success": True,
    "code": 10000,
    "message": "操作成功"}

schema = { "type": "object",
           "properties": {
               "success": { "type": "boolean" },
                "code": { "type": "integer" },
                "message": { "type": "string"  } },
            "required": ["success", "code", "message"]}



res = jsonschema.validate(instance=json_data, schema=schema)
print("检查结果是：", res)